home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PROGRAM
/
VS_804.ARJ
/
MAINTSRC.EXE
/
RPT_DBF.PRG
< prev
next >
Wrap
Text File
|
1991-10-25
|
3KB
|
121 lines
* Filename......: Rpt_Dbf.Prg
*
* Author........: Vernon E. Six, Jr.
*
* Last Update...: Tue 10-15-1991 10:41:12
*
* Notice........: Copyright (c) 1991 by Vernon E. Six, Jr.
* All Rights Reserved World Wide
*
* Dialect.......: Clipper v5.0x
#include "INKEY.CH"
#include "SETCURS.CH"
FUNCTION Rpt_Dbf()
*****
* Print the current database structure, etc.
*****
*****
* Is the printer on?
*****
IF !ISPRINTER()
VS_Tell(3,0,"",PADC("Printer Not Ready!",40),"")
RETURN(NIL)
ENDIF
*****
* Let the user select the printer
*****
VS_Reset()
VS_PrtMsg(2)
*****
* Turn the printer on
*****
SET(_SET_CONSOLE,.F.)
SET(_SET_PRINTER,.T.)
QQout( VS_Reset() + VS_CondOn() )
*****
* Print database header info
*****
Qout( VS_Bold("Database Name: ") + _DICTHDR->DBF_NAME )
Qout( VS_Bold(" Description: ") + _DICTHDR->DESC )
Qout( VS_Bold(" Recreate? ") + IF(_DICTHDR->CREATE, "Yes","No") )
Qout( VS_Bold(" Path: ") + _DICTHDR->PATH )
*****
* Print the structure
*****
Qout( "" )
Qout( VS_Bold("### Field Name Type Len,Dec Description ") )
Qout( VS_Bold(REPLICATE("-",78) ) )
_DICTFLD->( dbSeek( _DICTHDR->DBF_NAME ) )
DO WHILE .NOT. _DICTFLD->( EOF() )
IF _DICTFLD->DBF_NAME <> _DICTHDR->DBF_NAME
EXIT
ENDIF
QOut( _DICTFLD->FIELD_NMBR + " " )
QQOut( _DICTFLD->FIELD_NAME + " " )
QQOut( _DICTFLD->FIELD_TYPE + " " )
QQOut( STRZERO(_DICTFLD->FIELD_LEN,3) + " " )
QQOut( STRZERO(_DICTFLD->FIELD_DEC,3) + " " )
QQOut( _DICTFLD->DESC + " " )
_DICTFLD->( dbSkip() )
ENDDO
*****
* Print the index keys
*****
Qout( "" )
Qout( VS_Bold("## FileName Type Key ") )
Qout( VS_Bold(REPLICATE("-",78) ) )
_DICTNTX->( dbSeek( _DICTHDR->DBF_NAME ) )
DO WHILE .NOT. _DICTNTX->( EOF() )
IF _DICTNTX->DBF_NAME <> _DICTHDR->DBF_NAME
EXIT
ENDIF
QOut( _DICTNTX->ORDER + " " )
QQOut( _DICTNTX->NTX_NAME + " " )
QQOut( _DICTNTX->TYPE + " " )
QQOut( LEFT(_DICTNTX->KEY,60) )
_DICTNTX->( dbSkip() )
ENDDO
QQout( VS_FormFeed() )
*****
* All Done!
*****
SET(_SET_CONSOLE,.T.)
SET(_SET_PRINTER,.F.)
VS_EndText()
RETURN(NIL)
*** EOF: Rpt_Dbf() **********************************************************